package org.example.captcha.controller;

import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/log")
public class LoggerController {
    @RequestMapping("/l2")
    public void l2(){
        log.info("info级别的日志");
        log.trace("跟踪级别的日志");
        log.debug("调试日志");
        log.warn(" 警告日志");
        log.error("错误日志");
    }

//    private static final Logger logger = LoggerFactory.getLogger(LoggerController.class);
//
//    @RequestMapping("/l1")
//    public String l1(){
//        System.out.println("打印日志");
//         logger.info("logger日志对象所打印的日志");
//        return "success";
//    }

}
